home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-02-18 | 1.6 KB | 43 lines | [TEXT/R*ch] |
- Macintosh
- Sample Code Notes
- _____________________________________________________________________________
- Developer Technical Support
-
- #10: EditCdev
-
- Written by: Mark Bennett and Dave Brubeck
-
- Versions: 1.00 August 1988
- 1.10 June 1992
- Compiled for CodeWarrior 11 February 1997
-
- Components:
- EditCdev.c August 1, 1988
- EditCdev.π.rsrc June 12, 1992
- EditCdev.p August 1, 1988
- _____________________________________________________________________________
-
- EditCdev is a sample Control Panel device (cdev) that demonstrates
- the use of the edit-related messages and how to implement an
- editText item in a cdev. It utilizes the new undo, cut, copy,
- paste, and delete messages that are sent to cdevs in response to
- user menu selections.
-
- EditCdev is comprised of two editText items which can be edited
- and selected with the mouse or the Tab key.
-
- Changes in version 1.10
- _______________________
-
- There is a problem with the dialog manager routines. They don't check the
- length of what you are typing (or pasting) into a textEdit record. You
- can easily type over the 32K textEdit limit, and overwrite various parts of
- memory. To avoid this problem, a great deal of checking must be done
- whenever a character is typed or a paste is performed. I arbitrarily chose
- the limit to be 50 characters, but any limit less that 32K may be used by
- changing the maxLength constant.
-
- The new version also has two static text fields that always display the length
- of the text in the adjacent textEdit record.
-
-